execute as @p at @s if data entity @s Inventory[{id:"minecraft:written_book",tag:{title:"Explorer's Book"}}] run 

give @s minecraft:villager_spawn_egg{display:{Name:'[{"text":"

Inn Staff

"}]'},EntityTag:{id:villager,VillagerData:{
profession:librarian,
level:99,
type:plains},
CustomName:"\"

Inn Staff

\"",
Tags:["SKYWIZA","LOTW-ally"],
Offers:{Recipes:[





{buy:{
id:iron_nugget,Count:15,
tag:{display:{Name:"{\"text\":\"Silver Nugget\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- The currency of SKYWIZA\"}",
"{\"text\":\"- 64 silver nugget can exchange to 1 crystal nuggets\"}",
"{\"text\":\"--------------------\"}"]}}}
,

buyB:{
id:air,Count:1}
,

sell:{
id:writable_book,Count:1,
tag:{display:{Name:"{\"text\":\"Get Small Inn Room\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- Drop at required payment paper\"}",
"{\"text\":\"- Extend the room for 1 hour\"}",
"{\"text\":\"--------------------\"}"]}}}
,rewardExp:0b,maxUses:9999999},





{buy:{
id:iron_nugget,Count:30,
tag:{display:{Name:"{\"text\":\"Silver Nugget\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- The currency of SKYWIZA\"}",
"{\"text\":\"- 64 silver nugget can exchange to 1 crystal nuggets\"}",
"{\"text\":\"--------------------\"}"]}}}
,

buyB:{
id:air,Count:1}
,

sell:{
id:writable_book,Count:1,
tag:{display:{Name:"{\"text\":\"Get Medium Inn Room\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- Drop at required payment paper\"}",
"{\"text\":\"- Extend the room for 1 hour\"}",
"{\"text\":\"--------------------\"}"]}}}
,rewardExp:0b,maxUses:9999999},





{buy:{
id:prismarine_crystals,Count:1,
tag:{display:{Name:"{\"text\":\"Crystal Nuggets\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- The currency of SKYWIZA\"}",
"{\"text\":\"- 1 crystal nuggets can exchange to 64 silver nugget\"}",
"{\"text\":\"- 1 crystal nuggets can exchange to 1 emerald\"}",
"{\"text\":\"- 64 crystal nuggets can exchange to 1 white crystal\"}",
"{\"text\":\"--------------------\"}"]}}}
,

buyB:{
id:air,Count:1}
,

sell:{
id:writable_book,Count:1,
tag:{display:{Name:"{\"text\":\"Get Big Inn Room\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- Drop at required payment paper\"}",
"{\"text\":\"- Extend the room for 1 hour\"}",
"{\"text\":\"--------------------\"}"]}}}
,rewardExp:0b,maxUses:9999999},





{buy:{
id:iron_nugget,Count:1,
tag:{display:{Name:"{\"text\":\"Silver Nugget\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- The currency of SKYWIZA\"}",
"{\"text\":\"- 64 silver nugget can exchange to 1 crystal nuggets\"}",
"{\"text\":\"--------------------\"}"]}}}
,

buyB:{
id:air,Count:1}
,

sell:{
id:paper,Count:1,
tag:{display:{Name:"{\"text\":\"See Remaining Time\"}",
Lore:["{\"text\":\"--------------------\"}",
"{\"text\":\"- Drop at required payment paper\"}",
"{\"text\":\"- 7200 is 2 hours\"}",
"{\"text\":\"- 3600 is 1 hour\"}",
"{\"text\":\"- 1800 is 30 minutes\"}",
"{\"text\":\"- 900 is 15 minutes\"}",
"{\"text\":\"- 300 is 5 minutes\"}",
"{\"text\":\"--------------------\"}"]}}}
,rewardExp:0b,maxUses:9999999}










]},Invulnerable:1b,DeathLootTable:"minecraft:empty",
ArmorItems:[{},{},{},{id:"map",Count:1b}]}}